/**
 * Created with JetBrains WebStorm.
 * User: Eric
 * Date: 02/02/13
 * Time: 17:33
 * To change this template use File | Settings | File Templates.
 *
 *
 */


/*
 * this is a test file for design a Dao pattern like in Java.
 * This is the model of user
 */
var Event = function Event(){

}

Event.prototype = {
    initialize : function() {
        this.id;
        this.name,
        this.type,
        this.coordinateX,
        this.coordinateY,
        this.coordinateZ,
        this.date
    },

    /*
     *This function will take the rows of the SQL query and hydrate the user
     */
    init : function(parameters){
        this.id = parameters.id;
        this.name = parameters.name;
        this.type = parameters.type;
        this.coordonateX = parameters.coordinateX;
        this.coordonateY = parameters.coordinateY;
        this.coordonateZ = parameters.coordinateZ;
        this.date = parameters.date;
    },

    /*
     * Example of method of the object (the attributes of this object are public so getter is useless)
     */

    getId : function(){
        return this.id;
    },

    getName : function(){
        return this.name;
    },

    getCoordinateX : function(){
        return this.coordonateX;
    },

    getCoordinateY : function(){
        return this.coordonateY;
    },

    getCoordinateZ : function(){
        return this.coordonateZ;
    },

    getDate : function(){
        return this.date;
    }


}

/*
 * We export the class user so we ca use it after requiring this file.
 */
module.exports = Event;